import json

from constants import consts
from logger import logger

LOGGER = logger.CustomLogger()

class OwnerConfigMgr:
    def __init__(self):
        self.owner_config = {}
        self.load_owner_config()

    def load_owner_config(self):
        try:
            with open(consts.OWNER_CONFIG_FILENAME, 'r', encoding='utf-8') as file:
                self.owner_config = json.load(file)
        except Exception as e:
            LOGGER.error(f"[sys] update {consts.OWNER_CONFIG_FILENAME} file failed, error details: {e}")
